home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
djgpp
/
samples
/
hexcalc
/
hc.doc
next >
Wrap
Text File
|
1991-09-11
|
1KB
|
72 lines
valid constants:
- decimal ( 45 65 1 )
- real ( 1.0 4.5e-1 0.3 4e3 )
- hex ( 0x45c )
- octal ( 015 )
- binary ( 0b011010010 )
- "rhex" ( 0x1f3.43c ) (Ex: 0xc.8a = 12.5390625)
- constants "pi" and "e"
valid identifiers:
- up to 200 unique names
- letters, underscores, digits (not first char)
history:
!! is result of previous expression (same as !1)
!4 is result of fourth previous expression
statements:
identifier = expression
assignes value to identifier
expression
prints value of expression on screen (multi-format)
operators: (all except those marked "binary" work with reals)
+ addition
- subtraction
* multiplication
/ division
% modulus
<< left shift (y = x * 2**n)
>> right shift (y = x / 2**n)
& binary and
| binary or
^ binary xor
** exponentiation ( 3**2 = 9 )
unary - negation
unary ~ binary invert
( ) expression grouping
func() call built-in function
built-in functions:
sin
sinh
cos
cosh
tan
tanh
asin
asinh
acos
acosh
atan
atanh
exp
log
pow10
log10
pow2
log2
sqrt
exiting:
via ^C, ^Z, ^D